Windows USB教程

您所在的位置:网站首页 windows project教程 Windows USB教程

Windows USB教程

#Windows USB教程| 来源: 网络整理| 查看: 265

我一直在尝试按照Microsoft MSDN上的Windows USB教程进行操作,一直到最后都没有出现错误,下面是输出

1>------ Build started: Project: USB Application1, Configuration: Win7 Debug x64 ------ 1> device.cpp 1> main.cpp 1> Generating Code... 1> USB Application1.vcxproj -> c:\users\hp\documents\visual studio 2013\Projects\USB Application1\x64\Win7Debug\USBApplication1.exe 2>------ Build started: Project: USB Application1 Package, Configuration: Win7 Debug x64 ------ 2> Stamping x64\Win7Debug\USBApplication1.inf [Version] section with DriverVer=03/22/2014,13.49.5.125 2>C:\Program Files (x86)\Windows Kits\8.1\build\WindowsDriver.common.targets(1300,5): warning : The driver package project c:\Users\hp\documents\visual studio 2013\Projects\USB Application1\USB Application1 Package\USB Application1 Package.vcxproj doesn't have any references to other projects and no projects were packaged. 2>C:\Program Files (x86)\Windows Kits\8.1\build\WindowsDriver.common.targets(1300,5): warning : 2> ........................ 2> Signability test complete. 2> 2> Errors: 2> None 2> 2> Warnings: 2> None 2> 2> Catalog generation complete. 2> c:\users\hp\documents\visual studio 2013\Projects\USB Application1\x64\Win7Debug\USB Application1 Package\usbapplication1.cat 2> Done Adding Additional Store 2> Successfully signed: c:\users\hp\documents\visual studio 2013\Projects\USB Application1\x64\Win7Debug\USB Application1 Package\usbapplication1.cat 2> ========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

当我尝试在设备管理器中手动更新USB驱动程序时,我不断收到

The required section was not found in the INF.

我尝试了两个设备,一个拇指驱动器和一个手机,但都得到了相同的(非)结果。有谁知道哪里不对劲吗?

这是INF文件之一

; ; USBApplication1.inf ; ; Installs WinUsb ; [Version] Signature = "$Windows NT$" Class = USBDevice ClassGUID = {88BAE032-5A81-49f0-BC3D-A4FF138216D6} Provider = %ManufacturerName% CatalogFile=USBApplication1.cat DriverVer=03/22/2014,13.49.5.125 ; ========== Manufacturer/Models sections =========== [Manufacturer] %ManufacturerName% = Standard,NTamd64 [Standard.NTamd64] %DeviceName% =USB_Install, USB\VID_04E8&PID_685E ; ========== Class definition =========== [ClassInstall32] AddReg = ClassInstall_AddReg [ClassInstall_AddReg] HKR,,,,%ClassName% HKR,,NoInstallClass,,1 HKR,,IconPath,%REG_MULTI_SZ%,"%systemroot%\system32\setupapi.dll,-20" HKR,,LowerLogoVersion,,5.2 ; =================== Installation =================== [USB_Install] Include=winusb.inf Needs=WINUSB.NT [USB_Install.Services] Include=winusb.inf AddService=WinUsb,0x00000002,WinUsb_ServiceInstall [WinUsb_ServiceInstall] DisplayName = %WinUsb_SvcDesc% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WinUSB.sys [USB_Install.HW] AddReg=Dev_AddReg [Dev_AddReg] ; By default, USBDevice class uses iProduct descriptor to name the device in ; Device Manager on Windows 8 and higher. ; Uncomment for this device to use %DeviceName% on Windows 8 and higher: ;HKR,,FriendlyName,,%DeviceName% HKR,,DeviceInterfaceGUIDs,0x10000,"{5aecf9ec-5a73-421b-841d-e9ab9b241a2b}" [USB_Install.CoInstallers] AddReg=CoInstallers_AddReg CopyFiles=CoInstallers_CopyFiles [CoInstallers_AddReg] HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01011.dll,WdfCoInstaller" [CoInstallers_CopyFiles] WdfCoInstaller01011.dll [DestinationDirs] CoInstallers_CopyFiles=11 ; ================= Source Media Section ===================== [SourceDisksNames] 1 = %DiskName% [SourceDisksFiles] WdfCoInstaller01011.dll=1 ; =================== Strings =================== [Strings] ManufacturerName="" ClassName="Universal Serial Bus devices" DiskName="USBApplication1 Installation Disk" WinUsb_SvcDesc="WinUSB Driver" DeviceName="USBApplication1 Device" REG_MULTI_SZ = 0x00010000

好吧,我找到c:\windows\inf\setupapi.dev了,我想问题的部分是

dvi: CoInstaller 1: Enter 20:25:55.535 inf: Opened PNF: 'C:\Windows\INF\oem75.inf' ([strings]) !!! dvi: CoInstaller 1: failed(0xe0000101)! !!! dvi: Error 0xe0000101: The required section was not found in the INF. dvi: {DIF_INSTALLDEVICE - exit(0xe0000101)} 20:25:55.703 !!! ndv: Error(e0000101) installing device! ndv: Device install status=0xe0000101 ndv: Performing device install final cleanup... ! ndv: Queueing up error report since device installation failed... ndv: {Core Device Install - exit(0xe0000101)} 20:25:55.708 dvi: {DIF_DESTROYPRIVATEDATA} 20:25:55.709 dvi: CoInstaller 1: Enter 20:25:55.709 dvi: CoInstaller 1: Exit dvi: Default installer: Enter 20:25:55.710 dvi: Default installer: Exit dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 20:25:55.711 ump: Server install process exited with code 0xe0000101 20:25:55.718 ump: {Plug and Play Service: Device Install exit(e0000101)} ndv: {Update Driver Software Wizard exit(e0000101)}


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3